package com.higgins.eventtracking.client;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.higgins.eventtracking.client.dto.ChartDataDTO;
import com.higgins.eventtracking.client.dto.DynamicTypeDTO;
import com.higgins.eventtracking.client.dto.FinanceStatsDTO;
import com.higgins.eventtracking.client.dto.TransactionDTO;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface FinanceTrackingServiceAsync {
	void insertTransaction(TransactionDTO dto, AsyncCallback<String> callback) throws IllegalArgumentException;
//	void retrieveFinanceStats(AsyncCallback<FinanceStatsDTO> callback) throws IllegalArgumentException;
	void retrieveFinanceSavingsData(Integer points, AsyncCallback<ChartDataDTO> callback) throws IllegalArgumentException;
	void retrieveFinanceGoalsData(Integer points, AsyncCallback<ChartDataDTO> callback) throws IllegalArgumentException;
	void retrieveFinanceChartData(Boolean weeklyChart, Boolean yearlyExpense, Integer points, AsyncCallback<ChartDataDTO> callback)	throws IllegalArgumentException;
	void retrieveFinanceBreakdownChartData(Boolean weeklyChart, Boolean yearlyExpense, Integer offset, Integer points, AsyncCallback<ChartDataDTO> callback) throws IllegalArgumentException;
	void retrieveTotalSpentThisWeek(Date now, Boolean yearlyExpense, AsyncCallback<Double> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveTotalSpentThisMonth(Date now, Boolean yearlyExpense, AsyncCallback<Double> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveForecastSpendThisWeek(Date now, Boolean yearlyExpense, AsyncCallback<Double> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveForecastSpendThisMonth(Date now, Boolean yearlyExpense, AsyncCallback<Double> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveAverageWeeklySpend(Date now, Boolean yearlyExpense, AsyncCallback<Double> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveForecastSavingsThisMonth(Date now, Boolean yearlyExpense, AsyncCallback<Double> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveWeekNumber(Date now, AsyncCallback<String> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveTransactions(Date now, Boolean weekOrMonth, AsyncCallback<List<TransactionDTO>> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveTransactions(Integer weekInPast, Boolean weekOrMonth, AsyncCallback<List<TransactionDTO>> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void updateTransaction(TransactionDTO dto, AsyncCallback<String> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void deleteTransaction(Long id, AsyncCallback<String> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void retrieveDynamicTypes(String category, AsyncCallback<List<DynamicTypeDTO>> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
	void updateDynamicType(DynamicTypeDTO dto, AsyncCallback<String> callback) throws IllegalArgumentException, SecurityAccessDeniedException;
}
